<?php
	//error_reporting(0);					//屏蔽错误信息
	header("Content-type: text/html; charset=utf-8");
	date_default_timezone_set('PRC');		//设置中国时区
	
	define('ROOT_PATH',dirname(__FILE__));
	define('MODEL_PATH','model/');
	define('DEBUG',1);

	//类文件的自动加载
	function __autoload($classname){
		require_once(ROOT_PATH.'/../'.MODEL_PATH.$classname.'.class.php');
	}
	
	//数据库初始化配置
	include_once ROOT_PATH.'/../../config/config.php';
	DBConfig::setConfig($DBConfig);
	
	//引入smarty配置文件
	require('template.inc.php');
	
	//实例化
	$db = new Mysql();
	$page = new page($_GET['page']);
	$commonc = new common($page);
	
	//转换post，get提交
	$_POST=$commonc->strtohtml($_POST);
	$_GET=$commonc->strtohtml($_GET);
	
	//网站名称
	$site_title = $commonc->getInfo("setting", '6',"value");
	$site_title = $site_title['value'];
	$smarty->assign("site_title",$site_title);
?>